<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.1</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="__ADMIN__/css/font.css">
    <link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
    <script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
</head>

<body>
<div class="x-body">
    <form class="layui-form">
        <!--<input type="hidden" name="mch_id" value="{$finance.mch_id}">-->
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>商户ID
            </label>
            <div class="layui-input-inline">
                <input type="text" id="mch_id" name="mch_id" required="" lay-verify="required"
                       autocomplete="off" class="layui-input" value="{$finance['mch_id']}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>mch_id(PS:1638862926)
            </div>
        </div>

        <div class="layui-form-item">
            <label for="L_pass" class="layui-form-label">
                <span class="x-red">*</span>所属公众号ID
            </label>
            <div class="layui-input-inline">
                <input type="text" id="pay_uniacid" name="pay_uniacid" required="" lay-verify="required"
                       autocomplete="off" class="layui-input" value="{$finance.pay_uniacid}">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>pay_uniacid(PS:314)
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="x-red">*</span>所属部门</label>
            <div class="layui-input-inline">
                <select name="department" lay-verify="required">
                    <option value="">--选择部门--</option>
                    <option {if condition = "$finance['department'] eq 0"}selected{/if} value="0">可赞</option>
                    <option {if condition = "$finance['department'] eq 1"}selected{/if} value="1">雪鲸</option>
                    <option {if condition = "$finance['department'] eq 2"}selected{/if} value="2">东创</option>
                    <option {if condition = "$finance['department'] eq 3"}selected{/if} value="3">星权</option>
                </select>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>PS:可赞
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
                <span class="x-red"></span>openid
            </label>
            <div class="layui-input-inline">
                <textarea type="text" name="openid" autocomplete="off" class="layui-textarea">{$finance.openid}</textarea>
                <!--<input type="text" id="openid" name="openid" required="" lay-verify="required"-->
                <!--autocomplete="off" class="layui-input">-->
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>PS:oG5gN5UaGmU_v3aHWSL7oy3J_MvI
            </div>
        </div>

        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
                <span class="x-red"></span>appid
            </label>
            <div class="layui-input-inline">
                <!--<input type="text" name="value" id="L_repass" required=""-->
                <!--autocomplete="off" class="layui-input">-->
                <textarea type="text" name="appid" autocomplete="off" class="layui-textarea">{$finance.appid}</textarea>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>PS:wx29f3327f4ca22ea2
            </div>
        </div>

        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
                <span class="x-red"></span>mch_secrect
            </label>
            <div class="layui-input-inline">
                <!--<input type="text" name="value" id="L_repass" required=""-->
                <!--autocomplete="off" class="layui-input">-->
                <textarea type="text" name="mch_secrect" autocomplete="off" class="layui-textarea">{$finance.mch_secrect}</textarea>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>PS:oJfza521TGMsRdf3nZFXZUjzc8x8HTJY
            </div>
        </div>

        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
            </label>
            <button  class="layui-btn" lay-filter="add" lay-submit="">
                确定修改
            </button>
        </div>
    </form>
</div>
<script>
    layui.use(['form','layer'], function(){
        $ = layui.jquery;
        var form = layui.form
                ,layer = layui.layer;

        //监听提交
        form.on('submit(add)', function(data){
            $.ajax({
                type:'POST',
                dataType:'json',
                data:{data:data.field},
                url:"{:url('Finance/edit')}",
                success:function(obj){
                    layer.alert(obj.msg, {icon: obj.icon},function(){
                        // 获得frame索引
                        var index = parent.layer.getFrameIndex(window.name);
                        //关闭当前frame
                        parent.layer.close(index);
                        // 可以对父窗口进行刷新
                        x_admin_father_reload();
                    });
                }
            });
            return false;
        });
    });
</script>
</body>

</html>